<h1>Budgets</h1>
<!--budgets list-->
<ul>	
	<?php $pr=false; ?>
	<?php foreach($budgets as $budget):?>	
		<li>
			<?php $pr=true; ?>
			<a href="<?php echo site_url()."revisitbudget/?id=".$budget->id; ?>"><?php echo $budget->title.": ".$budget->saldo; ?> лв.</a>
			<a href="<?php echo site_url()."budgets/delete/?id=".$budget->id; ?>"><button>delete</button></a>
		</li>
	<?php endforeach;?>
</ul>
<?php if(!$pr): ?>
	No new budgets.
<?php endif; ?>
<!--insert note-->
<h2>Create new budget:</h2>
<form method="POST" action="<?php echo site_url()."budgets/insert"?>">
	<fieldset>
		<label for="title">budget title *:</label>
		<input type="textbox" value="<?php echo $title; ?>" name="title" placeholder="budget title"/>
	</fieldset>
	<fieldset>
		<label for="saldo">budget saldo *:</label>
		<input type="textbox" name="saldo" value="<?php echo $saldo; ?>" placeholder="budget saldo"/>&nbsp;лв.
	</fieldset>
	<input type="submit" value="Create budget"/>
</form>